defAdmCmd(new AbstractAdmCmdImpl("login"){
	execute:function(cmdLine,ctx){
		var admName = cmdLine.nextToken();
        var admAccount = findAdmAccount(admName);
        if (admAccount != null) {
            var data = Data.createData();
            data.put(AdmChannelDataConsts.AdmAccount, admAccount);
            data.put(AdmChannelDataConsts.CurCmd, this);
            addChannel(ctx.channel(), data);
            ctx.writeAndFlush("password:");
        } else {
            var data = getChannelData(ctx.channel());
            data.remove(AdmChannelDataConsts.Logined);
            ctx.writeAndFlush("can't find admAccount\r\n");
        }
	},
	executeContinue:function(cmdLine,ctx){
		var password = cmdLine.nextToken();
        var data = getChannelData(ctx.channel());
        data.remove(AdmChannelDataConsts.CurCmd);
        var admAccount = data.get(AdmChannelDataConsts.AdmAccount);
        if (admAccount.getPassword().equals(password)) {
            data.put(AdmChannelDataConsts.Logined, true);
            ctx.writeAndFlush("logined\r\n");
        } else {
            //admManager.removeChannel(ctx.channel());
            ctx.writeAndFlush("password error\r\n");
        }
	},
	usage:function(){
		return "login <accountname>";
	},
	needLogin:function(){
		return false;
	}
});